package com.xiyou.luckdraw.api.service;

import com.xiyou.luckdraw.api.dto.answer.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @ClassName: AnswerBankService
 * @Description: 题目Service接口
 * @author: limingxing
 * @Date: 2019-10-09 10:47
 */
public interface IAnswerBankService {

    /**
     * 添加题目
     * @param request
     * @return
     */
    AddAnswerBankResponse createAnswer(AddAnswerBankRequest request);

    /**
     * 获取答题库列表
     * @return
     */
    AnswerBankListResponse getAnswerList(AnswerBankListRequest request);

    /**
     * 更新题目状态
     * @param request
     * @return
     */
    DeleteAnswerResponse updateByAnswerId(DeleteAnswerRequest request);

    /**
     * 更新题目
     * @param request
     * @return
     */
    UpdateAnswerResponse updateAnswer(UpdateAnswerRequest request);

    /**
     * 读取excel中的数据
     */
    ExcelResponse readExcelFile(MultipartFile file);

    /**
     * 题目信息Excel导出
     * @param servletRequest
     * @return
     */
    List downloadAnswerExcel(HttpServletRequest servletRequest);

    /**
     * 根据列表添加题目
     * @param request
     * @return
     */
    ExcelResponse saveList(ExcelAnswerListRequest request);
}
